import React from 'react';
import styles from './index.css';
import Link from 'umi/link';

class index extends React.Component {
  render() {
    const listArr: any[] = ['aaaa', 'bbbb', 'cccc', 'lancy', 'rong', 'lily'];
    const listItems = listArr.map((name, key) =>
      (
        <li key={key}>
          <Link to={{ pathname: `/users/:${name}`, query: {from:'index'}}}>{name}</Link>
        </li>
      )
    );
    return (
      <div className={styles.normal}>
        <div className={styles.welcome} />
        <ul className={styles.list}>
          <li>
            <Link to={{ pathname: '/users' }}>users</Link>
          </li>
          <section>{listItems}</section>
        </ul>
      </div>
    );
  }
}
export default index;
